-- Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
--
-- this file licensed under the Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2
--
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
-- PURPOSE.
-- See the Mulan PSL v2 for more details.
--
-- Author: auto generate
-- Create: 2025-11-19
-- Description: DO NOT EDIT; Code generated by "db.lua.mako"
local Databases = require 'database'
local Col = require 'database.column'

---@class DcmidDBDatabase
---@field db DataBase
---@field select fun(db:DataBase, table: any, ...): SelectStatement
---@field update fun(db:DataBase, table: any, ...): UpdateStatement
---@field insert fun(db:DataBase, table: any, ...): InsertStatement
local DcmidDBDatabase = {}
DcmidDBDatabase.__index = DcmidDBDatabase

function DcmidDBDatabase.new(path, datas)
    local db = Databases(path)
    local obj = {db = db}

    obj.tables = db.tables
    return setmetatable(obj, DcmidDBDatabase)
end

function DcmidDBDatabase:select(table, ...)
    return self.db:select(table, ...)
end

function DcmidDBDatabase:update(table, ...)
    return self.db:update(table, ...)
end

function DcmidDBDatabase:insert(table, ...)
    return self.db:insert(table, ...)
end

function DcmidDBDatabase:delete(table, ...)
    return self.db:delete(table, ...)
end

function DcmidDBDatabase:exec(...)
    return self.db:exec(...)
end

return DcmidDBDatabase.new
